<template>
  <div style="margin-top:20px">
    <el-form ref="form" label-width="80px" :model="form">
      <el-row>
        <el-col :span="24">
          <div class="grid-content bg-purple">
            <el-form-item label="所属机构" style="margin-right:15px">
              <el-input v-model="form.createByBranch" :disabled="true"/>
            </el-form-item>
          </div>
        </el-col>
      </el-row>
      <!--<el-row>
        <el-col :span="24">
          <div class="grid-content bg-purple">
            <el-form-item label="用户编码" style="margin-right:15px">
              <el-input v-model="form.userCode" :disabled="true"/>
            </el-form-item>
          </div>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="24">
          <div class="grid-content bg-purple">
            <el-form-item label="订单编码" style="margin-right:15px">
              <el-input v-model="form.orderCode" :disabled="true"/>
            </el-form-item>
          </div>
        </el-col>
      </el-row>-->
      <el-row>
        <el-col :span="24">
          <div class="grid-content bg-purple">
            <el-form-item label="账户余额" style="margin-right:15px">
              <el-input v-model="form.accountAmount" :disabled="true"/>
            </el-form-item>
          </div>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="24">
          <div class="grid-content bg-purple">
            <el-form-item label="变动金额" style="margin-right:15px">
              <el-input v-model="form.paidAmount" :disabled="true"/>
            </el-form-item>
          </div>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="24">
          <div class="grid-content bg-purple">
            <el-form-item label="支付方式" style="margin-right:15px">
              <el-input v-model="form.paidLineType" :disabled="true"/>
            </el-form-item>
          </div>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="24">
          <div class="grid-content bg-purple">
            <el-form-item label="消费项目" style="margin-right:15px">
              <el-input v-model="form.paidItem" :disabled="true"/>
            </el-form-item>
          </div>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="24">
          <div class="grid-content bg-purple">
            <el-form-item label="消费类型" style="margin-right:15px">
              <el-input v-model="form.paidFeeType" :disabled="true"/>
            </el-form-item>
          </div>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="24">
          <div class="grid-content bg-purple">
            <el-form-item label="备注" style="margin-right:15px">
              <el-input type="textarea" :rows="3" v-model="form.paidRemark" :disabled="true"/>
            </el-form-item>
          </div>
        </el-col>
      </el-row>
    </el-form>
  </div>
</template>
<script>
  import Vue from 'vue'
  import 'xe-utils'
  import VXETable from 'vxe-table'
  import 'vxe-table/lib/index.css'
  import request from '@/utils/request'

  Vue.use(VXETable)
  export default {
    name: 'paidRecordDetail',
    data() {
      return {
        emptyForm: {},
        form: {
          code: '',
          userCode: '',
          orderCode: '',
          paidLineType: '',
          paidItem: '',
          paidFeeType: '',
          paidAmount: '',
          paidRemark: '',
          accountAmount: '',
          createByBranch: '',
        }
      }
    },
    created() {
      //保存空表单对象
      this.emptyForm = JSON.parse(JSON.stringify(this.form))
    },
    methods: {
      // 获取页面信息
      getInfo(code) {
        //查询到数据之前先展示空表单
        this.form = JSON.parse(JSON.stringify(this.emptyForm))
        request({url: `/arpa-basic-api/paidRecord/${code}`, method: 'get'}).then(response => {
          this.form = response.data
        })
      }
    }
  }
</script>
<style lang="scss" scoped>
  .dialog-footer {
    margin-top: 50px;
  }
</style>
